﻿using FrameWorkSong;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AudioExamples : MonoBehaviourSimplify
{
    public override void OnBeforeDestroy()
    {
        
    }

    // Start is called before the first frame update
    void Start()
    {
        AudioManager.Instance.PlayMusic(AudioName.Firefly);
        Debug.Log(GetNowTime());
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            AudioManager.Instance.PlaySound(AudioName.Shooting);
        }
        if (Input.GetKeyDown(KeyCode.B))
        {
            AudioManager.Instance.PlaySound(AudioName.Whip);
        }
        if (Input.GetKeyDown(KeyCode.C))
        {
            AudioManager.Instance.PlayMusic(AudioName.Shooting);
        }
        if (Input.GetKeyDown(KeyCode.D))
        {
            AudioManager.Instance.PlayMusic(AudioName.Firefly);
        }
        if (Input.GetKeyDown(KeyCode.Q))
        {
            ReleaseMemory();
          //  AudioManager.Instance.UnloadMusic();
        }
    }
}
